package com.gx.po;

import java.io.Serializable;
import java.util.Date;

/**
 * email_message_record
 * @author 
 */
public class EmailMessageRecord implements Serializable {
    /**
     * 记录ID
     */
    private Integer id;

    /**
     * 手机号
     */
    private String email;

    /**
     * 发送时间
     */
    private Date sendingTime;

    /**
     * 是否有效
     */
    private Boolean validity;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getSendingTime() {
        return sendingTime;
    }

    public void setSendingTime(Date sendingTime) {
        this.sendingTime = sendingTime;
    }

    public Boolean getValidity() {
        return validity;
    }

    public void setValidity(Boolean validity) {
        this.validity = validity;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmailMessageRecord other = (EmailMessageRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getSendingTime() == null ? other.getSendingTime() == null : this.getSendingTime().equals(other.getSendingTime()))
            && (this.getValidity() == null ? other.getValidity() == null : this.getValidity().equals(other.getValidity()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getSendingTime() == null) ? 0 : getSendingTime().hashCode());
        result = prime * result + ((getValidity() == null) ? 0 : getValidity().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", email=").append(email);
        sb.append(", sendingTime=").append(sendingTime);
        sb.append(", validity=").append(validity);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}